package app.common.dao;
import java.util.ArrayList;
import java.util.List;

import cn.lily.com.container.data.Record;
import cn.lily.com.exception.YaconException;
import cn.lily.esb.framework.drivers.db.bean.ControlDAO;
public class Leo_can_detail_infoBean extends ControlDAO implements Cloneable {
	private static final long serialVersionUID = 1L;
	public Leo_can_detail_infoBean() throws YaconException {
		super();
		setTableName("LEO_CAN_DETAIL_INFO");
	}
	String  fcan_detail_name;
	String  fcan_qua;
	String  fcan_kind;
	String  fres_id;
	String  fcan_detail_id;
	String  fcan_id;
	String  fcan_stat;
	String  fcan_firm_memo;
	String  fcan_typ_memo;
	String  fcan_demo;
	String  fcan_total;
	String  fcan_time;

	public void setCan_detail_name( String can_detail_name)throws YaconException{
		setFieldData("can_detail_name",can_detail_name,TEXT);
		this.fcan_detail_name=can_detail_name;
	}

	public String getCan_detail_name(){
		if ( this.fcan_detail_name == null){
			return "";
		}
		else {
			return this.fcan_detail_name;
		}
	}

	public void setCan_qua( String can_qua)throws YaconException{
		setFieldData("can_qua",can_qua,TEXT);
		this.fcan_qua=can_qua;
	}

	public String getCan_qua(){
		if ( this.fcan_qua == null){
			return "";
		}
		else {
			return this.fcan_qua;
		}
	}

	public void setCan_kind( String can_kind)throws YaconException{
		setFieldData("can_kind",can_kind,TEXT);
		this.fcan_kind=can_kind;
	}

	public String getCan_kind(){
		if ( this.fcan_kind == null){
			return "";
		}
		else {
			return this.fcan_kind;
		}
	}

	public void setRes_id( String res_id)throws YaconException{
		setFieldData("res_id",res_id,TEXT);
		this.fres_id=res_id;
	}

	public String getRes_id(){
		if ( this.fres_id == null){
			return "";
		}
		else {
			return this.fres_id;
		}
	}

	public void setCan_detail_id( String can_detail_id)throws YaconException{
		setFieldData("can_detail_id",can_detail_id,TEXT);
		this.fcan_detail_id=can_detail_id;
	}

	public String getCan_detail_id(){
		if ( this.fcan_detail_id == null){
			return "";
		}
		else {
			return this.fcan_detail_id;
		}
	}

	public void setCan_id( String can_id)throws YaconException{
		setFieldData("can_id",can_id,TEXT);
		this.fcan_id=can_id;
	}

	public String getCan_id(){
		if ( this.fcan_id == null){
			return "";
		}
		else {
			return this.fcan_id;
		}
	}

	public void setCan_stat( String can_stat)throws YaconException{
		setFieldData("can_stat",can_stat,TEXT);
		this.fcan_stat=can_stat;
	}

	public String getCan_stat(){
		if ( this.fcan_stat == null){
			return "";
		}
		else {
			return this.fcan_stat;
		}
	}

	public void setCan_firm_memo( String can_firm_memo)throws YaconException{
		setFieldData("can_firm_memo",can_firm_memo,TEXT);
		this.fcan_firm_memo=can_firm_memo;
	}

	public String getCan_firm_memo(){
		if ( this.fcan_firm_memo == null){
			return "";
		}
		else {
			return this.fcan_firm_memo;
		}
	}

	public void setCan_typ_memo( String can_typ_memo)throws YaconException{
		setFieldData("can_typ_memo",can_typ_memo,TEXT);
		this.fcan_typ_memo=can_typ_memo;
	}

	public String getCan_typ_memo(){
		if ( this.fcan_typ_memo == null){
			return "";
		}
		else {
			return this.fcan_typ_memo;
		}
	}

	public void setCan_demo( String can_demo)throws YaconException{
		setFieldData("can_demo",can_demo,TEXT);
		this.fcan_demo=can_demo;
	}

	public String getCan_demo(){
		if ( this.fcan_demo == null){
			return "";
		}
		else {
			return this.fcan_demo;
		}
	}

	public void setCan_total( String can_total)throws YaconException{
		setFieldData("can_total",can_total,TEXT);
		this.fcan_total=can_total;
	}

	public String getCan_total(){
		if ( this.fcan_total == null){
			return "";
		}
		else {
			return this.fcan_total;
		}
	}

	public void setCan_time( String can_time)throws YaconException{
		setFieldData("can_time",can_time,DATE);
		this.fcan_time=can_time;
	}

	public String getCan_time(){
		if ( this.fcan_time == null){
			return "";
		}
		else {
			return this.fcan_time;
		}
	}

	public  List<Leo_can_detail_infoBean> findListBeans(String sSqlWhere)throws YaconException {
		List<Leo_can_detail_infoBean> listBeans = new ArrayList<Leo_can_detail_infoBean>();
		findTable = findTableByWhere(sSqlWhere);
		while (findTable.next())
		{
			Leo_can_detail_infoBean fDaoBean  = new Leo_can_detail_infoBean();
			fDaoBean.fcan_detail_name = findTable.getString("can_detail_name");
			fDaoBean.fcan_qua = findTable.getString("can_qua");
			fDaoBean.fcan_kind = findTable.getString("can_kind");
			fDaoBean.fres_id = findTable.getString("res_id");
			fDaoBean.fcan_detail_id = findTable.getString("can_detail_id");
			fDaoBean.fcan_id = findTable.getString("can_id");
			fDaoBean.fcan_stat = findTable.getString("can_stat");
			fDaoBean.fcan_firm_memo = findTable.getString("can_firm_memo");
			fDaoBean.fcan_typ_memo = findTable.getString("can_typ_memo");
			fDaoBean.fcan_demo = findTable.getString("can_demo");
			fDaoBean.fcan_total = findTable.getString("can_total");
			fDaoBean.fcan_time = findTable.getString("can_time");
			fDaoBean.operate_mode = "edit";
			listBeans.add(fDaoBean);
		}
		return listBeans;
	}

	public Leo_can_detail_infoBean findBean(String sSqlWhere)throws YaconException {
		findTable = findTableByWhere(sSqlWhere);
		if (findTable.next())
		{
			Leo_can_detail_infoBean fDaoBean  = new Leo_can_detail_infoBean();
			fDaoBean.fcan_detail_name = findTable.getString("can_detail_name");
			fDaoBean.fcan_qua = findTable.getString("can_qua");
			fDaoBean.fcan_kind = findTable.getString("can_kind");
			fDaoBean.fres_id = findTable.getString("res_id");
			fDaoBean.fcan_detail_id = findTable.getString("can_detail_id");
			fDaoBean.fcan_id = findTable.getString("can_id");
			fDaoBean.fcan_stat = findTable.getString("can_stat");
			fDaoBean.fcan_firm_memo = findTable.getString("can_firm_memo");
			fDaoBean.fcan_typ_memo = findTable.getString("can_typ_memo");
			fDaoBean.fcan_demo = findTable.getString("can_demo");
			fDaoBean.fcan_total = findTable.getString("can_total");
			fDaoBean.fcan_time = findTable.getString("can_time");
			fDaoBean.operate_mode = "edit";
			return fDaoBean;
		}else
			return null;
	}

	public void setViewRecord(Record viewRecord) throws YaconException{
		if (viewRecord.getString("can_detail_name") != null)
			setCan_detail_name(viewRecord.getString("can_detail_name"));
		if (viewRecord.getString("can_qua") != null)
			setCan_qua(viewRecord.getString("can_qua"));
		if (viewRecord.getString("can_kind") != null)
			setCan_kind(viewRecord.getString("can_kind"));
		if (viewRecord.getString("res_id") != null)
			setRes_id(viewRecord.getString("res_id"));
		if (viewRecord.getString("can_detail_id") != null)
			setCan_detail_id(viewRecord.getString("can_detail_id"));
		if (viewRecord.getString("can_id") != null)
			setCan_id(viewRecord.getString("can_id"));
		if (viewRecord.getString("can_stat") != null)
			setCan_stat(viewRecord.getString("can_stat"));
		if (viewRecord.getString("can_firm_memo") != null)
			setCan_firm_memo(viewRecord.getString("can_firm_memo"));
		if (viewRecord.getString("can_typ_memo") != null)
			setCan_typ_memo(viewRecord.getString("can_typ_memo"));
		if (viewRecord.getString("can_demo") != null)
			setCan_demo(viewRecord.getString("can_demo"));
		if (viewRecord.getString("can_total") != null)
			setCan_total(viewRecord.getString("can_total"));
		if (viewRecord.getString("can_time") != null)
			setCan_time(viewRecord.getString("can_time"));
	}

}
